package org.mspring.crm.entity.permission;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * McrmAuthoritiesTree entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user_group")
public class UserGroup implements java.io.Serializable {
    private UserGroupPK userGroupPK;

    /**
     * 
     */
    public UserGroup() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param userGroupPK
     */
    public UserGroup(UserGroupPK userGroupPK) {
        super();
        this.userGroupPK = userGroupPK;
    }

    @EmbeddedId
    @AttributeOverrides( { @AttributeOverride(name = "userId", column = @Column(name = "user_id", nullable = false)), @AttributeOverride(name = "groupId", column = @Column(name = "group_id", nullable = false)) })
    public UserGroupPK getUserGroupPK() {
        return userGroupPK;
    }

    public void setUserGroupPK(UserGroupPK userGroupPK) {
        this.userGroupPK = userGroupPK;
    }
}